package cn.cdu.medical.entity;

import cn.cdu.basics.baseClass.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Column;
import java.time.LocalDateTime;
import java.util.Date;

@Data
@Entity
@Table(name = "medical_record")
@Schema(description = "电子病历")
@EqualsAndHashCode(callSuper = true)
public class MedicalRecord extends BaseEntity {

    @Schema(description = "用户ID")
    private String userId;

    @Schema(description = "患者姓名")
    private String patientName;
    
    @Schema(description = "患者性别")
    private String gender;
    
    @Schema(description = "患者年龄")
    private Integer age;
    
    @Schema(description = "患者档案号")
    private String patientFileNumber;
    
    @Schema(description = "门诊号")
    private String outpatientNumber;

    @Schema(description = "问诊ID")
    private String consultationId;

    @Schema(description = "挂号记录ID")
    private String orderId;

    @Schema(description = "医生ID")
    private String doctorId;
    
    @Schema(description = "医生姓名")
    private String doctorName;

    @Schema(description = "诊断类型（西医/中医）")
    private String diagnosisType;

    @Schema(description = "诊断名称")
    private String diagnosisName;

    @Schema(description = "诊断编码")
    private String diagnosisCode;

    @Schema(description = "主诉")
    @Column(columnDefinition = "TEXT")
    private String chiefComplaint;

    @Schema(description = "现病史")
    @Column(columnDefinition = "TEXT")
    private String presentIllness;

    @Schema(description = "初步诊断")
    @Column(columnDefinition = "TEXT")
    private String initialDiagnosis;

    @Schema(description = "建议类型（DIET/EXERCISE/LIFESTYLE）")
    private String adviceType;

    @Schema(description = "建议标题")
    private String adviceTitle;

    @Schema(description = "建议内容")
    @Column(columnDefinition = "TEXT")
    private String adviceContent;

    @Schema(description = "查体")
    @Column(columnDefinition = "TEXT")
    private String physicalExam;

    @Schema(description = "辅助检查")
    @Column(columnDefinition = "TEXT")
    private String auxiliaryExam;

    @Schema(description = "诊疗计划")
    @Column(columnDefinition = "TEXT")
    private String treatmentPlan;

    @Schema(description = "就诊类型")
    private String visitType;

    @Schema(description = "就诊时间")
    private LocalDateTime visitTime;

    @Schema(description = "科室名称")
    private String deptName;

    @Schema(description = "病历状态")
    private String status;

    @Schema(description = "创建人")
    private String createBy;

    @Schema(description = "创建时间")
    private Date createTime;

    @Schema(description = "更新人")
    private String updateBy;

    @Schema(description = "更新时间")
    private Date updateTime;

    @Schema(description = "病历内容")
    @Column(columnDefinition = "TEXT")
    private String content;

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getCreatedBy() {
        return createBy;
    }

    public void setCreatedBy(String createdBy) {
        this.createBy = createdBy;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public String getUpdatedBy() {
        return updateBy;
    }

    public void setUpdatedBy(String updatedBy) {
        this.updateBy = updatedBy;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }
} 
 